package com.bruce.apkinstaller.install;

import java.util.ArrayList;

/**
 * Created by Administrator on 2018/1/17.
 */

public abstract class AInstall extends ABaseImpl {

    /*批量安装时调用*/
    protected abstract void setInstallCallback(ArrayList<String> apklist, InstallStatusCallback installCallback);

    /*列表安装时调用*/
    protected void installNext() {
        finishedCount++;
        if (finishedCount <= mApklist.size()-1) {
            start(mApklist.get(finishedCount));
        } else {
            finishedCount = 0;
        }
    }

    /*单个安装时调用*/
    protected abstract void start(String apkfile);

    protected abstract void setInstallCallback(InstallStatusCallback installCallback);
}
